/*
 * @Descripttion: 
 * @Author: liuYaoYu
 * @Date: 2021-12-18 15:58:37
 * @LastEditors: liuYaoYu
 * @LastEditTime: 2021-12-18 16:50:10
 */
package main
import (
	"fmt"
)

func Bubblesort(arr *[5]int) {
	
	for i:=0;i<len(*arr);i++{
		temp:=(*arr)[i]
		for j:=i+1;j<len(*arr);j++{
			if (*arr)[i]>(*arr)[j]{
				(*arr)[i]=(*arr)[j]
				(*arr)[j]=temp
				temp=(*arr)[i]

			}
		}
	}
	fmt.Println(*arr)
	
}

func main(){
	var arr [5]int=[5]int{1,2,3,4,5}
	Bubblesort(&arr) 
}